package com.hqyj.hrms.modules.attendance.dao;

import com.hqyj.hrms.modules.attendance.entity.Attendance;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author rock
 * @since 2021-10-06
 */
public interface AttendanceMapper extends BaseMapper<Attendance> {
    @Select("SELECT * FROM attendance WHERE month = #{month}")
    @Results({
            @Result(property = "attId", column = "att_id"),
            @Result(property = "empId", column = "emp_id"),
            @Result(property = "month", column = "month"),
            @Result(property = "date", column = "date"),
            @Result(property = "typeOne", column = "type_one"),
            @Result(property = "typeTwo", column = "type_two"),
            @Result(property = "typeThree", column = "type_three"),
            @Result(property = "typeFour", column = "type_four"),
            @Result(property = "typeFive", column = "type_five"),
            @Result(property = "typeSix", column = "type_six"),
            @Result(property = "notes", column = "notes")})
    HashMap<String,Object> selectByMonth(String month);
}
